<template>
<el-main v-show="isHome" style="height: 1358px;padding: 0;">
      <h2>报名首页</h2>
      <div class="main">
        <div class="first">
          <el-card body-class="box-card" style="width: 30%;" @click="handleTeamInfo">
            <p>①团队信息</p>
          </el-card>
        <ArrowRightBold />
          <el-card body-class="box-card" style="width: 30%;" @click="handlePersonnelManage">
            <p>②人员管理</p>
          </el-card>
        </div>
     
        <div class="arrow-down">
          <div class="item">
            <ArrowDownBold />
          </div>
        </div>

       <div class="last">
          <el-card body-class="box-card" style="width: 30%;"  @click="handleExportInfo">
            <p>④信息导出</p>
          </el-card>
        <ArrowLeftBold />
          <el-card body-class="box-card" style="width: 30%;" @click="handleSingleSignup">
            <p>③单练报名</p>
          </el-card>
        </div>
    </div>
      <div class="end">
        <el-card body-class="step-box">
          <el-steps :active="activeStep" align-center>
            <el-step title="步骤一" description="团队信息"></el-step>
            <el-step title="步骤二" description="人员管理"></el-step>
            <el-step title="步骤三" description="单练报名"></el-step>
            <el-step title="步骤四" description="信息导出"></el-step>
          </el-steps>
        </el-card>
        <i class="el-icon-arrow-down arrow"></i>
      </div>
    </el-main>
</template>

<script setup>
import { useRouter, useRoute } from 'vue-router'
import { ref } from 'vue'



const route = useRoute()
const router = useRouter()
//控制主体显现与消失的值
const isHome = ref(true)

const matchString = localStorage.getItem('match');
const match = JSON.parse(matchString);


const id = route.query.id
const activeStep = ref(0);


//跳转到团队信息页面
function handleTeamInfo() {
  router.push({ path: '/home/information', query: { id: id } })
}

//跳转到人员管理页面
function handlePersonnelManage() {
  router.push({ path: '/home/personnel' })
}

//跳转到人员添加页面
function handleSingleSignup() {
  router.push({ path: '/home/solopractice' })
}

//跳转到单练报名页面
function handleExportInfo() {
  router.push({ path: '/home/fullinformation' })
}


</script>

<style  scoped>
.main{
  margin-top: 5%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.first,.last{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 60%;
}

.arrow-down{
  width: 60%;
  display: flex;
  flex-direction: row-reverse;
}
.item{
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
  }
h2{
  display: flex;
  justify-content: center;
  align-content: center;
  font-size: 36px;
}
svg {
  height: 40px;
  margin: 30px;
}
.end{
  width: 100%;
  position: absolute;
  bottom: 0;
}
</style>

